'''
/*
 * @Author: wevsmy 
 * @Date: 2017-10-24 19:16:33 
 * @Last Modified by: wevsmy
 * @Last Modified time: 2017-10-24 20:04:39
 */
'''
#codfig=utf-8
#导入socket
from socket import *

#创建socket
udpSocket = socket(AF_INET,SOCK_DGRAM)
#接收方地址
adder = ("192.168.21.1",8080)
newStr = "1:12312312312:user:user:32:hello"
#发送数据
udpSocket.sendto(newStr.encode("gb2312"),adder)

#关闭socket
udpSocket.close()
